<template>
	<navbar title="报名信息" :isBack="true"></navbar>
	<view class="page">
		
		<view class="" style="background-color: white;padding: 20rpx 20rpx 0 20rpx;border-radius: 10rpx;">
			<view class="" style="font-size: 32rpx;color: #5062A7;font-weight: bold;">
				个人资料
			</view>
			<u-form :model="Info" label-width="220" :label-style="{'font-size':'32rpx',}">
				<u-form-item :label="item.name" prop="name" v-for="(item,index) in InfoArr" :border-bottom="index == InfoArr.length-1 ? false:true">
					<view class="" v-if="item.type != 7 && item.type != 3">
						{{item.value}}
					</view>
					<view class="" v-if="item.type == 3">
						<span v-for="it in JSON.parse(JSON.stringify(item.value))" style="margin-left: 10rpx;">
							{{it}}</span>

					</view>
					<view class="" v-if="item.type == 7">

						<image v-if="item.value" :src="item.value" style="width: 140rpx;height: 140rpx;"
							mode="aspectFill"></image>

					</view>
				</u-form-item>
			</u-form>
		</view>
	</view>
</template>

<script setup lang="ts">
	import { ref, reactive } from 'vue'
	import { onLoad } from '@dcloudio/uni-app'
	import { speedOrderDetail, speedFormInfo,speedOrderCancel } from '@/service/api/speed'
	import {cityOrderDetail,cityFormInfo,cityOrderCancel} from '@/service/api/city'
	const Info = reactive({
		address: "",
		city: '',
		cover: "",
		create_time: "",
		id: "",
		latitude: "",
		longitude: "",
		order_no: "",
		pay_price: "",
		pay_time: "",
		province: "",
		speed_id: "",
		stage_name: "",
		state: "",
		time: "",
		user_id: "",
		start_time:"",
		end_time:""
	})
		const InfoArr = ref([]) as any
		const param = reactive({
			id:"",
			type:1 //1是七天速成2是城市巡回
		})
		onLoad((options)=>{
			param.id = options.id;
			param.type = options.type
			if(param.type == 1){
				getSpeedProfile()
			}else{
				getCityProfile()
			}
		})
		const getSpeedProfile = async()=>{
			const res = await speedFormInfo(param);
			InfoArr.value = res.msg;
		 
		}
		const getCityProfile = async()=>{
			const res = await cityFormInfo(param);
			InfoArr.value = res.msg;
		 
		 
		}
</script>

<style>
	.page {
		min-height: calc(100vh - 68px);
		background-color: #F8F8F9;
		overflow: hidden;
		padding: 20rpx 30rpx;
	
	}
</style>